﻿<%@ Page Language="C#" MasterPageFile="~/View/Admin/Template.master" AutoEventWireup="true" CodeFile="QuanLyNhaCungCap.aspx.cs" Inherits="View_Admin_QuanLyNhaCungCap" Title="Quản lí Nhà cung Cấp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table class="style1">
        <tr>
            <td align="right">
                Tên NCC :</td>
            <td align="left">
                <asp:TextBox ID="txtTenncc" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="txtTenncc" ErrorMessage="Không được trống" 
                    ValidationGroup="a"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td align="right">
                Địa Chỉ :</td>
            <td align="left">
                <asp:TextBox ID="txtdc" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                    ControlToValidate="txtdc" ErrorMessage="Không được trống" ValidationGroup="a"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td align="right">
                Điện Thoại :</td>
            <td align="left">
                <asp:TextBox ID="txtDienThoai" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                    ControlToValidate="txtDienThoai" Display="Dynamic" 
                    ErrorMessage="Không được trống" ValidationGroup="a"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                    ControlToValidate="txtDienThoai" ErrorMessage="Phải nhập số điện thoại" 
                    ValidationExpression="[0-9]+" ValidationGroup="a" Display="Dynamic"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td align="right">
                <asp:Label ID="lblThongBao" runat="server" Font-Italic="True" ForeColor="Red"></asp:Label>
            </td>
            <td align="left">
                <asp:Button ID="btnThem" runat="server" onclick="btnThem_Click" Text="Thêm" 
                    ValidationGroup="a" />
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                    onrowcancelingedit="GridView1_RowCancelingEdit" 
                    onrowdeleting="GridView1_RowDeleting" onrowediting="GridView1_RowEditing" 
                    onrowupdating="GridView1_RowUpdating">
                    <Columns>
                        <asp:BoundField DataField="mancc" HeaderText="Mã Nhà Cung Cấp" />
                        <asp:BoundField DataField="tenncc" HeaderText="Tên Nhà Cung Cấp" />
                        <asp:BoundField DataField="dienthoai" HeaderText="Số ĐT" />
                        <asp:BoundField DataField="diachi" HeaderText="Địa Chỉ" />
                        <asp:CommandField CancelText="Hủy" EditText="Sửa" ShowEditButton="True" 
                            UpdateText="Cập Nhật" />
                        <asp:CommandField DeleteText="Xóa" ShowDeleteButton="True" />
                    </Columns>
                </asp:GridView>
            </td>
        </tr>
    </table>
</asp:Content>

